const request = require('../httprequest.js')

/**
 * 添加收藏
 * @param title
 * @param link
 * @returns {Promise<unknown>}
 */
function addCollect (articleId) {
  return request.post(`lg/collect/${articleId}/json`)
}

/**
 * 取消收藏
 * @param articleId
 * @returns {Promise<unknown>}
 */
function unCollect (articleId) {
  return request.post(`lg/uncollect_originId/${articleId}/json`)
}


module.exports = {
  addCollect,
  unCollect
}
